package com.example.drug.jpa;

import java.util.List;

import com.example.common.entity.RxDrugs;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface RxDrugsRepository extends JpaRepository<RxDrugs, Long> {
    
    @Query(value = "select * from order_rx_drugs where rx_order_no_nvarchar = ?1 and d_type_tinyint in (2,3)",nativeQuery = true)
    List<RxDrugs> findByRxOrderNo(String RxOrderNO);
    
    @Query(value = "select * from order_rx_drugs where rx_order_no_nvarchar = ?1",nativeQuery = true)
    List<RxDrugs> findAllByRxOrderNo(String RxOrderNO);
}
